'use strict';
const upyun = require('upyun');
const upyunConfig = require('./_user');

const service = new upyun.Service(upyunConfig.appName, upyunConfig.username, upyunConfig.password);
const client = new upyun.Client(service);

module.exports = {
  async uploadFile(fileName, data) {
    await client.putFile(fileName, JSON.stringify(data));
  },
};
